import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/biz/punchrecord/` + url, ...arg)

/**
 * 打卡记录Api接口管理器
 *
 * @author 罗超
 * @date  2024/01/17 10:53
 **/
export default {
	// 获取打卡记录分页
	sysPunchRecordPage(data) {
		return request('page', data, 'get')
	},
	// 提交打卡记录表单 edit为true时为编辑，默认为新增
	sysPunchRecordSubmitForm(data, edit = false) {
		return request(edit ? 'edit' : 'add', data)
	},
	// 删除打卡记录
	sysPunchRecordDelete(data) {
		return request('delete', data)
	},
	// 获取打卡记录详情
	sysPunchRecordDetail(data) {
		return request('detail', data, 'get')
	},
	// 人员导出
	punchRecordExport(data) {
		return request('exportPunchRecord', data, 'get', {
			responseType: 'blob'
		})
	}
}
